﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001CB RID: 459
	public class THiveSwitchDatabase : TCustomSqlStatement
	{
		// Token: 0x06000F61 RID: 3937 RVA: 0x0030B74C File Offset: 0x0030994C
		public THiveSwitchDatabase(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveSwitchDatabase;
		}

		// Token: 0x170002E1 RID: 737
		// (get) Token: 0x06000F62 RID: 3938 RVA: 0x0030B760 File Offset: 0x00309960
		// (set) Token: 0x06000F63 RID: 3939 RVA: 0x0030B768 File Offset: 0x00309968
		public virtual TObjectName DbName
		{
			get
			{
				return this.dbName;
			}
			set
			{
				this.dbName = value;
			}
		}

		// Token: 0x06000F64 RID: 3940 RVA: 0x0030B774 File Offset: 0x00309974
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			THiveSwitchDBSqlNode thiveSwitchDBSqlNode = (THiveSwitchDBSqlNode)this.rootNode;
			this.dbName = thiveSwitchDBSqlNode.DbName;
			return 0;
		}

		// Token: 0x06000F65 RID: 3941 RVA: 0x0030B7AC File Offset: 0x003099AC
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000F66 RID: 3942 RVA: 0x0030B7BC File Offset: 0x003099BC
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001373 RID: 4979
		private TObjectName dbName;
	}
}
